***Primary dataset restrictions

replace age=80 if age>80 & age!=. // Because ATUS top-codes at 80 in some years and 85 in other years
drop if holiday==1 // observation excluded if it falls on a holiday 
drop if age <18
drop if age >64
drop if native ==0 & yrimmig==0
drop if citizen ==3 // drops natives born abroad ~= 1,180 obs *added v6, 8/25/2017
drop if marst==1 & sp_female==female // dropping same sex married couples

* Keeping only respondents with spouse present and in age range
keep if marst==1 
drop if sp_age<18 & sp_age!=.
drop if sp_age>64 & sp_age!=.

*Assume the unmarried parter matches are the spouse for the "married -- spouse present" ATUS respondents (74 cases)
drop if um_age<18 & sp_age==.
drop if um_age>64 & sp_age==.

*Drop if they do not match to either (this actually happens in the above line)
drop if sp_age==. & um_age==.

*Make the weight variable (each year to have equal weight)
egen sumwt=sum(wt06), by(year)
gen newwt=wt06/sumwt	
	
label var newwt "Adjusted ATUS Weight"
